package com.moarea.app.service.inter.login;

import com.moarea.app.lang.model.ResultObject;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * 登录控制接口
 * <p>
 * jizhong
 * <p>
 * 2017-10-26
 */
public interface ILoginService {

    /**
     * 用户登录
     * <p>
     * jizhong
     * <p>
     * 2017-10-27
     *
     * @param request 参数
     *                USERNAME 用户名
     *                PASSWORD 密码
     * @param session HttpSession
     */
    ResultObject login(Map<String, String> param, HttpServletRequest request, HttpServletResponse response, HttpSession session);


    /**
     * 获取当前登录用户的信息
     *
     * @param session HttpSession
     * @return 当前登录用户信息
     */
    ResultObject obtainUserInfo(HttpSession session);

    /**
     * 用户退出
     *
     * @param session HttpSession
     * @return 退出结果
     */
    ResultObject exit(HttpSession session);

    /**
     * 密码修改
     *
     * @param param   参数
     * @param session HttpSession
     * @return 结果
     */
    ResultObject changePassword(Map<String, Object> param, HttpSession session);
}
